<h2>Список всех номеров газеты</h2>
<p>&nbsp;</p>
<ul>
    {% set year=0 %}
    {% for issue in issues %}
    {% set newyear=issue.firstdate|date('Y') %}
    {% if newyear!=year %}<h3>{{ newyear }}</h3><hr />{% endif %}
    <li class="clearfix">
        {% if issue.image!='' %}<img src="/public/{{ issue.image }}.w250.preview" alt="{{ issue.number }}" style="border: 1px solid black;float: left;margin-right: 13px" />{% endif %}
        <h3><a href="/newspaper/{{ issue.number }}/">&numero;{{ issue.number }}</a></h3>
        {% if issue.maintitle!='' %}<h5>&laquo;{{ issue.maintitle|raw }}&raquo;</h5>{% endif %}
        <p>{{ issue.firstdate|date('d.m.Y') }}&nbsp;&mdash; {{ issue.lastdate|date('d.m.Y') }}</p>
        {% if issue.pdf!='' %}<p><a href="/public/{{ issue.pdf }}" target="_blank">скачать в виде PDF</a></p>{% endif %}
    </li>
    <hr />
    {% set year=newyear %}
    {% else %}
    <li>Номеров в базе нет.</li>
    {% endfor %}
</ul>